import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
export const columns: BasicColumn[] = [
  {
    title: '用户名称',
    dataIndex: 'userName',
    width: 200,
  },
  {
    title: '访问路径',
    dataIndex: 'url',
    width: 200,
  },
  {
    title: '客户端',
    dataIndex: 'clientId',
    width: 200,
  },
  {
    title: '请求类型/返回码',
    //dataIndex: 'httpMethod,httpStatusCode',
    width: 200,
    customRender: ({ text }: { text: any; index: number }) => {
      return text['httpMethod'] + '/' + text['httpStatusCode'];
    },
  },
  {
    title: '访问IP',
    dataIndex: 'clientIpAddress',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'userName',
    label: '用户名称',
    component: 'Input',
    colProps: { span: 8 },
  },
];
